package com.ytq.secutiry.service;

import com.ytq.secutiry.dto.MyUser;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

/**
 * @author yuantongqin
 * desc: 验证权限限制
 * 2020-09-30
 */
@Service
public class UserDetailServiceImpl implements UserDetailsService {

    @Override
    public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {

        System.out.println("根据用户名查询数据：s=="+s);

        return new MyUser("admin","1111");

    }
}
